package com.big.tree.controller;

import com.big.tree.entity.User;
import com.big.tree.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/***********************************************************************
 * 版权所有(C) 纯米科技(上海)股份有限公司 2014-2023
 * Copyright 2014-2023 CHUNMI TECHNOLOGY CO..
 * <p/>
 * This software is the confidential and proprietary information of
 * CHUNMI Corporation ("Confidential Information").  You
 * shall not disclose such Confidential Information and shall use
 * it only in accordance with the terms of the license agreement
 * you entered into with CHUNMI.
 ***********************************************************************/
@RestController
public class UserController {
    @Autowired
    private UserService userService;

    @GetMapping("/user/getOne/master")
    public User getOneByMater(){
        User user = userService.getOne();
        return user;
    }
    @GetMapping("/user/getOne/slave")
    public User getOneBySlave(){
        return  userService.getOne();
    }


    @GetMapping("user/getOne")
    public User getOne(){
        User user = new User();
        user.setUserName("hello world");
        user.setId(1L);
        return user;
    }
}
